package day05;

class A{
	int i;
	void m1(int x){
		x++;
		System.out.println("x="+x);
	}
	void m2(B b){
		b.x++;
		System.out.println("in A" + b.x);
	}
}

class B{
	int x;
}

public class TestParameter{
	public static void main(String[]args){
		A a = new A();
		int y = 10;
		a.m1(y);
		System.out.println("y="+y);
		B b = new B();
		b.x = 100;
		a.m2(b);
		System.out.println("in main:"+b.x);
	}
}